There has been proposed an image forming apparatus having a function of forming marks for measurement of positional deviation on a belt, detecting position of the marks based on a light receiving signal from an optical sensor having a detection region on the belt, measuring a positional deviation amount of image formation based on the detection result, and correcting position (timing) of image formation so as to reduce the positional deviation amount. In the image forming apparatus, for example, there is a case where noises caused by scratch, dust, etc., on a belt are included in the light receiving signal, so that an accuracy of the measurement of the positional deviation amount is reduced. Accordingly, related-art discloses an image forming apparatus which compares a wave peak value of each wave of the light receiving signal with a predetermined threshold value, regards a wave having a wave peak below the predetermined threshold value as a noise, and removes the noise.
However, the related-art image forming apparatus could perform only one method for removing the noises, that is, the method of removing the noises by comparing a wave peak value and a threshold value. As such, the related-art image forming apparatus could not effectively remove noises of various wave forms (wave peak value, wave width, etc.).